﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 作业3
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("输入第一个数：");
            int num1, num2;
            string s = Console.ReadLine();
            num1 = int.Parse(s);
            Console.WriteLine("输入第二个数：");
            s = Console.ReadLine();
            num2 = int.Parse(s);
            int x, y,temp;
            if (num1 < num2)//交换
            {
                num1 ^= num2;
                num2 ^= num1;
                num1 ^= num2;
            }
            x = num1;
            y = num2;//让num1,num2值不变
            while (y != 0)
            {
                temp = x % y;
                x = y;
                y = temp;
            }
           
            Console.WriteLine("它们的最小公倍数数为{0}", num1 * num2 / x);
            Console.ReadKey();
        }
    }
}
